package com.yanjr.modules.cms.entity;

import org.springframework.stereotype.Component;

import com.yanjr.common.Constants;
import com.yanjr.common.persistence.DataEntity;
import com.yanjr.common.persistence.Annotation.Column;
import com.yanjr.common.persistence.Annotation.Database;
import com.yanjr.common.persistence.Annotation.Table;

/**
 * 文章Entity
 */

@Database("jeesite")
@Table("cms_article_data")
@Component
public class ArticleData extends DataEntity<ArticleData> {

	private static final long serialVersionUID = 1L;
	@Column("id")
	private String id;		// 编号
	@Column("content")
	private String content;	// 内容
	@Column("copyfrom")
	private String copyfrom;// 来源
	@Column("relation")
	private String relation;// 相关文章
	@Column("allow_comment")
	private String allowComment;// 是否允许评论

	private Article article;
	
	public ArticleData() {
		super();
		this.allowComment = Constants.YES;
	}
	
	public ArticleData(String id){
		this();
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCopyfrom() {
		return copyfrom;
	}

	public void setCopyfrom(String copyfrom) {
		this.copyfrom = copyfrom;
	}

	public String getRelation() {
		return relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

	public String getAllowComment() {
		return allowComment;
	}

	public void setAllowComment(String allowComment) {
		this.allowComment = allowComment;
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

}